/*
 * Copyright (c) 2024 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#include <device_tree/interface/PCIeDevice.h>

MC_MODULE_REFLECT(
    device_tree, dev::gen::PCIeDevice,
    (DeviceName)(FunctionClass)(VendorId)(DeviceId)(SubSystemVendorId)(SubSystemDeviceId)(Location)(Slot),
    (Segment)(SocketId)(Bus)(Device)(Function)(DevBus)(DevDevice)(DevFunction)(DiagnosticFault),
    (PredictiveFault)(UCEByBIOS)(BandwidthReduction)(LinkSpeedReduced)(SlotType)(FunctionProtocol),
    (FunctionType)(ComponentType)(Container)(DeviceType)(GroupPosition)((SetDeviceBDF, "SetDeviceBDF"))
    ((SetRootBDF, "SetRootBDF")))

namespace dev::gen {

bool PCIeDevice::SetDeviceBDF(uint8_t bus, uint8_t device, uint8_t function) {
    MC_THROW(mc::not_implemented_exception, "SetDeviceBDF not implemented");
};

bool PCIeDevice::SetRootBDF(uint8_t bus, uint8_t device, uint8_t function) {
    MC_THROW(mc::not_implemented_exception, "SetRootBDF not implemented");
};

} // namespace dev::gen